<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserinfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('userinfos', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamps();
            $table->string('name')->unique()->comment('账户登录名|唯一索引');
            $table->string('pic')->comment('用户头像路径|（默认为空string）这里只保存图片的路径，图片根域名请使用自定义常量进行拼接');
            $table->string('password')->comment('账户登录密码');
            $table->string('nickname')->unique()->comment('账户昵称|唯一索引');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('userinfos');
    }
}
